package com.yonyou.cms.epc.client.entity.graphic;

import com.baomidou.mybatisplus.annotation.*;
import com.yonyou.cms.epc.client.entity.BasePO;
import com.yonyou.cms.epc.client.entity.part.PartInfoPO;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;

import java.io.Serializable;

/**
 * <p>
 * </p>
 * @author xh
 * @since 2022-06-09
 */
@TableName("tt_graphic_assembly_info")
public class GraphicAssemblyInfoPO extends BasePO<GraphicAssemblyInfoPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 系统名称
     */
    @TableField(exist = false)
    private String systemName;

    /**
     * 车型名称
     */
    @TableField(exist = false)
    private String modelName;

    /**
     * 图解总成ID
     */
    @TableId(value = "ASSEMBLY_ID", type = IdType.AUTO)
    private Integer assemblyId;
    /**
     * APPID
     */
    @TableField(value = "APP_ID")
      private String appId;

    /**
     * 车型代码
     */
    @TableField(value = "MODEL_CODE")
    private String modelCode;

    /**
     * 系统代码
     */
    @TableField(value = "SYSTEM_CODE")
    private String systemCode;

    /**
     * 主表ID
     */
    @TableField("GRAPHIC_ID")
    private Integer graphicId;

    /**
     * 热点编号
     */
    @TableField("REDIAN_CODE")
    private String redianCode;

    /**
     * 代码
     */
    @TableField("GRAPHIC_CODE")
    private String graphicCode;

    /**
     * 名称
     */
    @TableField("GRAPHIC_NAME")
    private String graphicName;

    /**
     * 父级ID
     */
    @TableField("PARENT_ID")
    private String parentId;

    /**
     * 三级代码
     */
    @TableField("THREE_MENU")
    private String threeMenu;

    /**
     * 二级代码
     */
    @TableField("TWO_MENU")
    private String twoMenu;

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * 一级代码
     */
    @TableField("ONE_MENU")
    private String oneMenu;

    /**
     * 备件备注
     */
    @TableField(exist = false)
    private String remark;

    /**
     * 单元用量
     */
    @TableField("UNIT_AMOUNT")
    private String unitAmount;

    /**
     * 层级（默认1级）
     */
    @TableField("TOP_LEVEL")
    private Integer topLevel;

    /**
     * 是否备件代码
     */
    @TableField("IS_SPARE")
    private Integer isSpare;

    /**
     * 备注
     */
    @TableField("REMARK_ASSEMBLY")
    private String remarkAssembly;

    /**
     * 对应的总称图片id
     */
    @TableField("PIC_SRC")
    private String picSrc;

    /**
     * 是否删除
     */
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    /**
     * 系统名称
     */
    @TableField(exist = false)
    private Integer rownum;

    /**
     * ID
     */
    @TableField(exist = false)
    private String partId;

    /**
     * 配件详情
     */
    @TableField(exist = false)
    private PartInfoPO partInfoPo;

    public PartInfoPO getPartInfoPo() {
        return partInfoPo;
    }

    public void setPartInfoPo(PartInfoPO partInfoPo) {
        this.partInfoPo = partInfoPo;
    }

    public GraphicAssemblyInfoPO() {
        super();
    }

    public String getPartId() {
        return partId;
    }

    public void setPartId(String partId) {
        this.partId = partId;
    }

    public Integer getAssemblyId() {
        return assemblyId;
    }

    public void setAssemblyId(Integer assemblyId) {
        this.assemblyId = assemblyId;
    }

    public Integer getGraphicId() {
        return graphicId;
    }

    public void setGraphicId(Integer graphicId) {
        this.graphicId = graphicId;
    }

    public String getRedianCode() {
        return redianCode;
    }

    public void setRedianCode(String redianCode) {
        this.redianCode = redianCode;
    }

    public String getSystemCode() {
        return systemCode;
    }

    public void setSystemCode(String systemCode) {
        this.systemCode = systemCode;
    }

    public String getSystemName() {
        return graphicName;
    }

    public void setSystemName(String systemName) {
        this.graphicName = systemName;
    }

    public String getThreeMenu() {
        return threeMenu;
    }

    public void setThreeMenu(String threeMenu) {
        this.threeMenu = threeMenu;
    }

    public String getTwoMenu() {
        return twoMenu;
    }

    public void setTwoMenu(String twoMenu) {
        this.twoMenu = twoMenu;
    }

    public String getOneMenu() {
        return oneMenu;
    }

    public void setOneMenu(String oneMenu) {
        this.oneMenu = oneMenu;
    }

    public String getUnitAmount() {
        return unitAmount;
    }

    public void setUnitAmount(String unitAmount) {
        this.unitAmount = unitAmount;
    }

    public Integer getTopLevel() {
        return topLevel;
    }

    public void setTopLevel(Integer topLevel) {
        this.topLevel = topLevel;
    }

    public Integer getIsSpare() {
        return isSpare;
    }

    public void setIsSpare(Integer isSpare) {
        this.isSpare = isSpare;
    }

    public String getPicSrc() {
        return picSrc;
    }

    public void setPicSrc(String picSrc) {
        this.picSrc = picSrc;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.assemblyId;
    }

    public String getGraphicCode() {
        return graphicCode;
    }

    public void setGraphicCode(String graphicCode) {
        this.graphicCode = graphicCode;
    }

    public String getGraphicName() {
        return graphicName;
    }

    public void setGraphicName(String graphicName) {
        this.graphicName = graphicName;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getRemarkAssembly() {
        return remarkAssembly;
    }

    public void setRemarkAssembly(String remarkAssembly) {
        this.remarkAssembly = remarkAssembly;
    }

    public String getModelCode() {
        return modelCode;
    }

    public void setModelCode(String modelCode) {
        this.modelCode = modelCode;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public Integer getRownum() {
        return rownum;
    }

    public void setRownum(Integer rownum) {
        this.rownum = rownum;
    }

    @Override
    public String toString() {
        return "GraphicAssemblyInfoPO{" +
                "assemblyId=" + assemblyId +
                ", graphicId=" + graphicId +
                ", redianCode=" + redianCode +
                ", graphicCode=" + graphicCode +
                ", graphicName=" + graphicName +
                ", threeMenu=" + threeMenu +
                ", twoMenu=" + twoMenu +
                ", oneMenu=" + oneMenu +
                ", unitAmount=" + unitAmount +
                ", topLevel=" + topLevel +
                ", isSpare=" + isSpare +
                ", picSrc=" + picSrc +
                ", isDeleted=" + isDeleted +
                "}";
    }

    /**
     * 将PO 信息转化为DTO
     * @param dto 需要进行转换的dto
     * @author xh
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "assemblyId");
    }

}
